import Vue from 'vue'
import VueRouter from 'vue-router'


import HomePage from '../views/HomePage.vue'
import InforMation from '../views/InforMation.vue'
import LookForHousing from '../views/LookForHousing.vue'
import MyInformation from '../views/MyInformation.vue'
import TabBar from '../views/TabBar.vue'

import { Search } from 'vant';

Vue.use(Search);
Vue.use(VueRouter)

const router = new VueRouter({
    routes: [
        {
            path: '/',
            component: TabBar,
            redirect: '/article',
            // 配置二级路由规则
            children: [
                {
                    path: 'article',
                    component: HomePage
                },
                {
                    path: 'user',
                    component: InforMation
                },
                {
                    path: 'like',
                    component: LookForHousing
                },
                {
                    path: 'collect',
                    component: MyInformation
                },
            ]
        },
        {
            path: '',
            component: HomePage,
        }
    ]
})

export default router

